//
// Created by 32827 on 2024/1/6.
//

#ifndef STM32OSCOVER_USER_TASK_H
#define STM32OSCOVER_USER_TASK_H
#include "yz_includes.h"
#include "yzl_fatfs_include.h"
#include "string.h"
#include "yzl_softport_include.h"
#include "yzl_font.h"
#include "ff.h"
#include "yzdef.h"
#include "yzl_driver_include.h"
#include "user_recv_transmit.h"

#define USER_TASK_I2C_1306_SHOW 0x00000000
#define USER_TASK_I2C_1306_INIT 0x00000001
#define USER_TASK_I2C_1306_TEST 0x00000002
#define USER_TASK_SDIO_SDCARD_TEST 0x00000003
#define USER_TASK_SCREEN_TEST 0x00000004
#define USER_TASK_DIALOG_TEST 0x00000005
#define USER_TASK_SR04_TEST 0x00000006
#define USER_TASK_MPU6050_INIT 0x00000007

#define USER_TASK_LS 0x00000010
#define USER_TASK_TF 0x00000011
#define USER_TASK_RM 0x00000012
#define USER_TASK_MKDIR 0x00000013
//TODO: Finish above task method
#pragma pack(1)
typedef struct {
    uint16_t PathStringLen;
    //String Path
} TASK_LS_REQ_HEADER;

typedef struct {
    uint16_t status;
    uint16_t FileCount;
    //String File LenS
    //String File NameS
} TASK_LS_RESP_HEADER;

typedef struct {
    uint16_t FileSavePathLen;
    uint32_t FileSize;
    //String File Save Path
    //FileData Block Count 512
} TASK_TF_REQ_HEADER;

typedef struct {
    uint16_t status;
} TASK_TF_RESP_HEADER;

typedef struct {
    uint16_t FilePathStringLen;
    //String File Path
} TASK_RM_REQ_HEADER;

typedef struct {
    uint16_t status;
} TASK_RM_RESP_HEADER;

typedef struct {
    uint16_t DirPathLen;
    //String Dir Path
} TASK_MKDIR_REQ_HEADER;

typedef struct {
    uint16_t status;
} TASK_MKDIR_RESP_HEADER;
#pragma pack()
YZF_RESULT user_task_i2c_1306_show();
YZF_RESULT user_task_i2c_1306_init();
YZF_RESULT user_task_i2c_1306_test();
YZF_RESULT user_task_SDIO_SDCARD_TEST();
YZF_RESULT user_task_screen_test();
YZF_RESULT user_task_dialog_test();
YZF_RESULT user_task_ls();
YZF_RESULT user_task_tf();
YZF_RESULT user_task_rm();
YZF_RESULT user_task_mkdir();
YZF_RESULT user_task_sr04_test();
YZF_RESULT user_task_mpu6050_init();
#endif //STM32OSCOVER_USER_TASK_H
